package com.stlm2.controller;

import com.stlm2.dems.entity.Flux;
import com.stlm2.dems.service.FluxService;
import com.stlm2.util.codecontent.CodeContent;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Author：fuchunyu
 * Date：2018/1/2
 * Description：
 */
@Controller
@RequestMapping("/flux")
public class FluxController {

    @Resource
    private FluxService fluxService;

    @ResponseBody
    @RequestMapping(value = "fluxAll.json",produces = "application/json;charset=utf-8")
    public String fluxAll(String companyCode){

        Flux flux=new Flux();
        flux.setState(1);
        List<Flux> fluxes=fluxService.getList(-1,-1,flux);
        return CodeContent.returnSuccess(fluxes);

    }
}
